function [ ecgPeakVals ] = getECGPeakValsManuallyGUI ( normEcgPixelLoc, unshiftedEcgPixelLoc, dicomImg, inputAxes, instructionText )
%UNTITLED Summary of this function goes here
%   Detailed explanation goes here
set(instructionText, 'string', strcat('Please left click on the R-wave peak immediately to the left of your chosen flow waveform.', ...
    ' Then, please right click on the R-wave peak immediately to the right of your chosen flow waveform.'));
axes(inputAxes)
imshow(dicomImg)

[x,y] = getpts;
ecgPeakVals = [x y];

[vals,I] = sort(ecgPeakVals(:,1)); %sort the input peaks from left to right
ecgPeakVals = ecgPeakVals(I,:);

axisOffset = length([unshiftedEcgPixelLoc]) - length([normEcgPixelLoc]); %aligns indices with x-axis (for later processing)
ecgPeakVals(:,1) = ecgPeakVals(:,1) - axisOffset;

end
